package farmers;

import java.util.ArrayList;
import java.util.List;

public class Atest {

    public static List<String> list = new ArrayList<>();

    public static void main(String[] args) {

        生成0000到9999();
        解析();




    }



    public static void 生成0000到9999(){

        for (int i = 0; i <= 9999; i++) {
            String num = String.format("%04d", i);
            list.add(num);
//            System.out.println(num);
        }
    }

    public static void 解析(){
        for (String str : list) {
            String[] parts = str.split("(?<=.)"); // 使用正则表达式(?<=.)来匹配每个字符前的位置
//            System.out.println(String.join(",", parts)); // 使用逗号连接数组元素

            for (int i = 0; i < parts.length; i++) {
                System.out.println("KeyPress \"" + parts[i] + "\"");
            }
            System.out.println("Delay 1000");
        }
    }
}
